If the Escape key is used for a window/app cycler/switcher shortcut
(such as "Switch windows directly"), then there is no way to cancel
the switching/cycling operation with the keyboard.
This change allows cancelling such an operation by pressing the Tab
key, but only if Tab is not already being used by the current
switcher/cycler shortcut.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/315
if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
return Clutter.EVENT_STOP;
- if (keysym == Clutter.Escape)
+ // Note: pressing one of the below keys will destroy the popup only if
+ // that key is not used by the active popup's keyboard shortcut
+ if (keysym == Clutter.Escape || keysym == Clutter.Tab)
this.destroy();
return Clutter.EVENT_STOP;